import requests
from fake_useragent import UserAgent

ua = UserAgent()

headers = {'User-Agent': ua.random}

url = 'http://127.0.0.1:8000/useragent'
response = requests.get(url,headers=headers)
print(response.text)


url = 'http://127.0.0.1:8000/cookie/'
headers = {
    # 'Cookie': 'sessionid=e8jNAPzIahuCMj',
}
cookies = {
    'sessionid': 'e8jNAPzIahuCMj',
    'zdz':'123456789'
}
response = requests.get(url, headers=headers,cookies=cookies)
print(response.text)

url = 'http://127.0.0.1:8000/referer/'
headers = {
    'referer': 'http://127.0.0.1:8000/',
}

response = requests.get(url, headers=headers)
print(response.text)
